﻿using System;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Content.Spritesheet.Player
{
    public class NativeSheet : ManagerSheet
    {
        public new static void LoadContent()
        {
            _instance = new NativeSheet();
        }

        public enum Objects
        {
            Arrow,
            ArrowCropped,
        }

        public override string SpriteSheetPath
        {
            get
            {
                return "Content/Images/Player/Native.png";
            }
        }

        protected override void LoadSprites()
        {
            AddSprite(Indicator.FaceIndicator, new TE_Rectangle(4, 1, 1, 1));

            AddEnumList<IdleState>(IdleState.Down, IdleState.Left, new TE_Rectangle(0, 0, 1, 2));

            AddEnumList<WalkDownState>(WalkDownState.Walk0, WalkDownState.Walk5, new TE_Rectangle(0, 2, 1, 2));
            AddEnumList<WalkRightState>(WalkRightState.Walk0, WalkRightState.Walk5, new TE_Rectangle(0, 4, 1, 2));
            AddEnumList<WalkUpState>(WalkUpState.Walk0, WalkUpState.Walk5, new TE_Rectangle(0, 6, 1, 2));
            AddEnumList<WalkLeftState>(WalkLeftState.Walk0, WalkLeftState.Walk5, new TE_Rectangle(0, 8, 1, 2));

            AddEnumList<AttackDownState>(AttackDownState.Attack0, AttackDownState.Attack4, new TE_Rectangle(0, 12, 2, 2));
            AddEnumList<AttackLeftState>(AttackLeftState.Attack0, AttackLeftState.Attack4, new TE_Rectangle(0, 18, 2, 2));
            AddEnumList<AttackRightState>(AttackRightState.Attack0, AttackRightState.Attack4, new TE_Rectangle(0, 14, 2, 2));
            AddEnumList<AttackUpState>(AttackUpState.Attack0, AttackUpState.Attack4, new TE_Rectangle(0, 16, 2, 2));

            AddEnumList<HitRightState>(HitRightState.Hurt, HitRightState.Die6, new TE_Rectangle(0, 20, 2, 2));
            AddEnumList<HitLeftState>(HitLeftState.Hurt, HitLeftState.Die6, new TE_Rectangle(0, 22, 2, 2));

            AddEnumList<Ghost>(Ghost.Ghost0, Ghost.Ghost3, new TE_Rectangle(14, 20, 1, 2));

            AddEnumList<PickupDownState>(PickupDownState.Pickup0, PickupDownState.PickupDown, new TE_Rectangle(6, 0, 1.5f, 2));
            AddEnumList<PickupRightState>(PickupRightState.Pickup0, PickupRightState.PickupRight, new TE_Rectangle(6, 2, 1.5f, 2));
            AddEnumList<PickupUpState>(PickupUpState.Pickup0, PickupUpState.PickupUp, new TE_Rectangle(6, 4, 1.5f, 2));
            AddEnumList<PickupLeftState>(PickupLeftState.Pickup0, PickupLeftState.PickupLeft, new TE_Rectangle(6, 6, 1.5f, 2));

            AddEnumList<WalkRightCarryState>(WalkRightCarryState.Walk0, WalkRightCarryState.Walk5, new TE_Rectangle(13.5f, 0, 1, 2));
            AddEnumList<WalkDownCarryState>(WalkDownCarryState.Walk0, WalkDownCarryState.Walk5, new TE_Rectangle(13.5f, 2, 1.5f, 2));
            AddEnumList<WalkLeftCarryState>(WalkLeftCarryState.Walk0, WalkLeftCarryState.Walk5, new TE_Rectangle(13.5f, 4, 1, 2));
            AddEnumList<WalkUpCarryState>(WalkUpCarryState.Walk0, WalkUpCarryState.Walk5, new TE_Rectangle(13.5f, 6, 1.5f, 2));

            AddSprite(ThrowState.Down, new TE_Rectangle(7, 8, 1, 2));
            AddSprite(ThrowState.Right, new TE_Rectangle(8, 8, 1.5f, 2));
            AddSprite(ThrowState.Up, new TE_Rectangle(9.5f, 8, 1, 2));
            AddSprite(ThrowState.Left, new TE_Rectangle(10.5f, 8, 1.5f, 2));

            AddSprite(Indicator.TileIndicator, new TE_Rectangle(4, 0, 1, 1));
            AddSprite(Indicator.ShadowIndicator, new TE_Rectangle(5, 0, 1, 1));

            AddEnumList<FallState>(FallState.Fall0, FallState.Fall6, new TE_Rectangle(0, 10, 1.5f, 2));
            AddSprite(FallState.End, new TE_Rectangle(0, 0, 0, 0));

            AddSprite(Objects.Arrow, new TE_Rectangle(5, 1, 1, 0.5f));
            AddSprite(Objects.ArrowCropped, new TE_Rectangle(5, 1, 0.8f, 0.5f));
        }
    }
}